import os

pip_installs = os.popen("pip3.4 list").read()
installs_array = [a.split(" ")[0] for a in pip_installs.split("\n")]

def is_installed(package_name):
    index = installs_array.index(package_name)
    if index is None:
        return False
    else:
        return True

if __name__ == '__main__':
    print(is_installed("gevent"))